﻿// ----------------------------------------------------------------------------------
// Sample Code from Fernando Machado Píriz's blog: http://fernandomachadopiriz.com
//
// <copyright company="Fernando Machado Píriz" file="GivingAPresentationException.cs">
// Copyright(c) Fernando Machado Píriz. Distributed under FSF's GPL v2.</copyright>
// ----------------------------------------------------------------------------------
// This code and information are provided "as is" without warranty of any kind,
// either expressed of implied, including but not limited to the implied warranties
// of merchantability and/or fitness for a particular purpose.
// ----------------------------------------------------------------------------------
namespace GivingAPresentation.Commons
{
    using System;
    using System.Runtime.Serialization;

    /// <summary>
    /// An application specific exception raised by parts of this application.
    /// </summary>
    [Serializable]
    public class GivingAPresentationException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the GivingAPresentationException class.
        /// </summary>
        public GivingAPresentationException()
            : base()
        {
        }

        /// <summary>
        /// Initializes a new instance of the GivingAPresentationException class with a specified error message.
        /// </summary>
        /// <param name="message">The message that describes the error.</param>
        public GivingAPresentationException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the GivingAPresentationException class with a specified error message and a reference to
        /// the inner exception that is the cause of this exception.
        /// </summary>
        /// <param name="message">The error message that explains the reason for the exception.</param>
        /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic)
        /// if no inner exception is specified.</param>
        public GivingAPresentationException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

        /// <summary>
        /// Initializes a new instance of the GivingAPresentationException class with serialized data.
        /// </summary>
        /// <param name="info">The <code>System.Runtime.Serialization.SerializationInfo</code> that holds the serialized object data about
        /// the exception being thrown.</param>
        /// <param name="context">The <code>System.Runtime.Serialization.StreamingContext</code> that contains contextual information about
        /// the source or destination.</param>
        protected GivingAPresentationException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}